Fix up error messages.
authorAlex Larsson <alexl@redhat.com>
Wed, 6 Jun 2001 16:20:18 +0000 (16:20 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Wed, 6 Jun 2001 16:20:18 +0000 (16:20 +0000)
2001-06-06  Alex Larsson  <alexl@redhat.com>

* gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
Fix up error messages.

gdk/linux-fb/gdkmain-fb.c

index a00dd4c22151eb074b81a7d9644254928896e3c6..77318ddeebc0cf241ea3155b8d4f78619516afad 100644 (file)
@@ -37,6 +37,7 @@
 #include <string.h>
 #include <sys/vt.h>
 #include <sys/kd.h>
+#include <errno.h>
 
 #include "gdk.h"
 
@@ -498,7 +499,7 @@ gdk_fb_display_new ()
   display->console_fd = open ("/dev/console", O_RDWR);
   if (display->console_fd < 0)
     {
-      g_warning ("Can't open /dev/console: %s", strerror (display->console_fd));
+      g_warning ("Can't open /dev/console: %s", strerror (errno));
       g_free (display);
       return NULL;
     }
@@ -542,7 +543,7 @@ gdk_fb_display_new ()
   display->tty_fd = open (buf, O_RDWR|O_NONBLOCK);
   if (display->tty_fd < 0)
     {
-      g_warning ("Can't open %s: %s", buf, strerror (display->tty_fd));
+      g_warning ("Can't open %s: %s", buf, strerror (errno));
       close (display->console_fd);
       g_free (display);
       return NULL;
@@ -556,7 +557,7 @@ gdk_fb_display_new ()
   display->fb_fd = open (fb_filename, O_RDWR);
   if (display->fb_fd < 0)
     {
-      g_warning ("Can't open %s: %s", fb_filename, strerror (display->fb_fd));
+      g_warning ("Can't open %s: %s", fb_filename, strerror (errno));
       g_free (fb_filename);
       close (display->tty_fd);
       close (display->console_fd);